<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

class DatabaseException {
	
	//constructor
	function DatabaseException() {
		
	}
	
	//methods
	function throw($ex) {
		$ex = sprintf('#%s: %s', mysql_errno(), mysql_error());
		$this->halt($ex);
	}
	
	function halt($msg) {
		exit($msg);
	}
}
//
?>